<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:Form::radios('row[type]', $typeList, '', ['data-rule'=>'required'])}
        </div>
    </div>
    <div data-favisible="type=1">
        <div class="form-group" >
            <label class="control-label col-xs-12 col-sm-2">{:__('周一')}:</label>
            <div class="col-xs-12 col-sm-8">
                {:Form::switcher('row[monday_switch]', '0', ['color'=>'success'])}
            </div>
        </div>
        <div class="form-group" data-favisible="monday_switch=1">
            <label class="control-label col-xs-12 col-sm-2"></label>
            <div class="col-xs-12 col-sm-8">
                <dl class="fieldlist" data-template="mondaytpl" data-name="row[monday_config]">
                    <dd>
                        <ins>{:__('上课时间')}</ins>
                        <ins>{:__('下课时间')}</ins>
                        <ins>{:__('课时')}</ins>
                    </dd>
                    <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                    <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                    <textarea name="row[monday_config]" class="form-control hidden" cols="30" rows="5">[{"start":"10:34:54","end":"10:35:17","count":"3"}]</textarea>
                </dl>
                <script id="mondaytpl" type="text/html">
                    <dd class="form-inline">
                        <ins>
                            {:Form::timepicker("<%=name%>[<%=index%>][start]", '', ['data-rule'=>'required','data-date-format'=>'HH:mm'])}
                        </ins>
                        <ins>
                            {:Form::timepicker("<%=name%>[<%=index%>][end]", '', ['data-rule'=>'required','data-date-format'=>'HH:mm'])}
                        </ins>
                        <ins>
                            {:Form::text('<%=name%>[<%=index%>][count]', '', ['data-rule'=>'required'])}
                        </ins>

                        <!--下面的两个按钮务必保留-->
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </dd>
                </script>
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('周二')}:</label>
            <div class="col-xs-12 col-sm-8">
                {:Form::switcher('row[tuesday_switch]', '0', ['color'=>'success'])}
            </div>
        </div>
        <div class="form-group" data-favisible="tuesday_switch=1">
            <label class="control-label col-xs-12 col-sm-2"></label>
            <div class="col-xs-12 col-sm-8">
                <dl class="fieldlist" data-template="tuesdaytpl" data-name="row[tuesday_config]">
                    <dd>
                        <ins>{:__('上课时间')}</ins>
                        <ins>{:__('下课时间')}</ins>
                        <ins>{:__('课时')}</ins>
                    </dd>
                    <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                    <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                    <textarea name="row[tuesday_config]" class="form-control hidden" cols="30" rows="5"></textarea>
                </dl>
                <script id="tuesdaytpl" type="text/html">
                    <dd class="form-inline">
                        <ins>
                            {:Form::timepicker("<%=name%>[<%=index%>][start]", '', ['data-rule'=>'required','data-date-format'=>'HH:mm'])}
                        </ins>
                        <ins>
                            {:Form::timepicker("<%=name%>[<%=index%>][end]", '', ['data-rule'=>'required','data-date-format'=>'HH:mm'])}
                        </ins>
                        <ins>
                            {:Form::text('<%=name%>[<%=index%>][count]', '', ['data-rule'=>'required'])}
                        </ins>

                        <!--下面的两个按钮务必保留-->
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </dd>
                </script>
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('周三')}:</label>
            <div class="col-xs-12 col-sm-8">
                {:Form::switcher('row[wednesday_switch]', '0', ['color'=>'success'])}
            </div>
        </div>
        <div class="form-group" data-favisible="wednesday_switch=1">
            <label class="control-label col-xs-12 col-sm-2"></label>
            <div class="col-xs-12 col-sm-8">
                <dl class="fieldlist" data-template="wednesdaytpl" data-name="row[wednesday_config]">
                    <dd>
                        <ins>{:__('上课时间')}</ins>
                        <ins>{:__('下课时间')}</ins>
                        <ins>{:__('课时')}</ins>
                    </dd>
                    <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                    <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                    <textarea name="row[wednesday_config]" class="form-control hidden" cols="30" rows="5"></textarea>
                </dl>
                <script id="wednesdaytpl" type="text/html">
                    <dd class="form-inline">
                        <ins>
                            {:Form::timepicker("<%=name%>[<%=index%>][start]", '', ['data-rule'=>'required','data-date-format'=>'HH:mm'])}
                        </ins>
                        <ins>
                            {:Form::timepicker("<%=name%>[<%=index%>][end]", '', ['data-rule'=>'required','data-date-format'=>'HH:mm'])}
                        </ins>
                        <ins>
                            {:Form::text('<%=name%>[<%=index%>][count]', '', ['data-rule'=>'required'])}
                        </ins>

                        <!--下面的两个按钮务必保留-->
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </dd>
                </script>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('周四')}:</label>
            <div class="col-xs-12 col-sm-8">
                {:Form::switcher('row[thursday_switch]', '0', ['color'=>'success'])}
            </div>
        </div>
        <div class="form-group" data-favisible="thursday_switch=1">
            <label class="control-label col-xs-12 col-sm-2"></label>
            <div class="col-xs-12 col-sm-8">
                <dl class="fieldlist" data-template="thursdaytpl" data-name="row[thursday_config]">
                    <dd>
                        <ins>{:__('上课时间')}</ins>
                        <ins>{:__('下课时间')}</ins>
                        <ins>{:__('课时')}</ins>
                    </dd>
                    <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                    <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                    <textarea name="row[thursday_config]" class="form-control hidden" cols="30" rows="5"></textarea>
                </dl>
                <script id="thursdaytpl" type="text/html">
                    <dd class="form-inline">
                        <ins>
                            {:Form::timepicker("<%=name%>[<%=index%>][start]", '', ['data-rule'=>'required','data-date-format'=>'HH:mm'])}
                        </ins>
                        <ins>
                            {:Form::timepicker("<%=name%>[<%=index%>][end]", '', ['data-rule'=>'required','data-date-format'=>'HH:mm'])}
                        </ins>
                        <ins>
                            {:Form::text('<%=name%>[<%=index%>][count]', '', ['data-rule'=>'required'])}
                        </ins>

                        <!--下面的两个按钮务必保留-->
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </dd>
                </script>
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('周五')}:</label>
            <div class="col-xs-12 col-sm-8">
                {:Form::switcher('row[friday_switch]', '0', ['color'=>'success'])}
            </div>
        </div>
        <div class="form-group" data-favisible="friday_switch=1">
            <label class="control-label col-xs-12 col-sm-2"></label>
            <div class="col-xs-12 col-sm-8">
                <dl class="fieldlist" data-template="fridaytpl" data-name="row[friday_config]">
                    <dd>
                        <ins>{:__('上课时间')}</ins>
                        <ins>{:__('下课时间')}</ins>
                        <ins>{:__('课时')}</ins>
                    </dd>
                    <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                    <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                    <textarea name="row[friday_config]" class="form-control hidden" cols="30" rows="5"></textarea>
                </dl>
                <script id="fridaytpl" type="text/html">
                    <dd class="form-inline">
                        <ins>
                            {:Form::timepicker("<%=name%>[<%=index%>][start]", '', ['data-rule'=>'required','data-date-format'=>'HH:mm'])}
                        </ins>
                        <ins>
                            {:Form::timepicker("<%=name%>[<%=index%>][end]", '', ['data-rule'=>'required','data-date-format'=>'HH:mm'])}
                        </ins>
                        <ins>
                            {:Form::text('<%=name%>[<%=index%>][count]', '', ['data-rule'=>'required'])}
                        </ins>

                        <!--下面的两个按钮务必保留-->
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </dd>
                </script>
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('周六')}:</label>
            <div class="col-xs-12 col-sm-8">
                {:Form::switcher('row[saturday_switch]', '0', ['color'=>'success'])}
            </div>
        </div>
        <div class="form-group" data-favisible="saturday_switch=1">
            <label class="control-label col-xs-12 col-sm-2"></label>
            <div class="col-xs-12 col-sm-8">
                <dl class="fieldlist" data-template="saturdaytpl" data-name="row[saturday_config]">
                    <dd>
                        <ins>{:__('上课时间')}</ins>
                        <ins>{:__('下课时间')}</ins>
                        <ins>{:__('课时')}</ins>
                    </dd>
                    <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                    <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                    <textarea name="row[saturday_config]" class="form-control hidden" cols="30" rows="5"></textarea>
                </dl>
                <script id="saturdaytpl" type="text/html">
                    <dd class="form-inline">
                        <ins>
                            {:Form::timepicker("<%=name%>[<%=index%>][start]", '', ['data-rule'=>'required','data-date-format'=>'HH:mm'])}
                        </ins>
                        <ins>
                            {:Form::timepicker("<%=name%>[<%=index%>][end]", '', ['data-rule'=>'required','data-date-format'=>'HH:mm'])}
                        </ins>
                        <ins>
                            {:Form::text('<%=name%>[<%=index%>][count]', '', ['data-rule'=>'required'])}
                        </ins>

                        <!--下面的两个按钮务必保留-->
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </dd>
                </script>
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('周日')}:</label>
            <div class="col-xs-12 col-sm-8">
                {:Form::switcher('row[sunday_switch]', '0', ['color'=>'success'])}
            </div>
        </div>
        <div class="form-group" data-favisible="sunday_switch=1">
            <label class="control-label col-xs-12 col-sm-2"></label>
            <div class="col-xs-12 col-sm-8">
                <dl class="fieldlist" data-template="sundaytpl" data-name="row[sunday_config]">
                    <dd>
                        <ins>{:__('上课时间')}</ins>
                        <ins>{:__('下课时间')}</ins>
                        <ins>{:__('课时')}</ins>
                    </dd>
                    <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                    <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                    <textarea name="row[sunday_config]" class="form-control hidden" cols="30" rows="5"></textarea>
                </dl>
                <script id="sundaytpl" type="text/html">
                    <dd class="form-inline">
                        <ins>
                            {:Form::timepicker("<%=name%>[<%=index%>][start]", '', ['data-rule'=>'required','data-date-format'=>'HH:mm'])}
                        </ins>
                        <ins>
                            {:Form::timepicker("<%=name%>[<%=index%>][end]", '', ['data-rule'=>'required','data-date-format'=>'HH:mm'])}
                        </ins>
                        <ins>
                            {:Form::text('<%=name%>[<%=index%>][count]', '', ['data-rule'=>'required'])}
                        </ins>

                        <!--下面的两个按钮务必保留-->
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </dd>
                </script>
            </div>
        </div>
    </div>


    <div data-favisible="type=2">
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('周一至周六')}:</label>
            <div class="col-xs-12 col-sm-8">
                {:Form::switcher('row[monday_saturday_switch]', '0', ['color'=>'success'])}
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2"></label>
            <div class="col-xs-12 col-sm-8">
                <dl class="fieldlist" data-template="monday_saturdaytpl" data-name="row[monday_saturday_config]">
                    <dd>
                        <ins>{:__('上课时间')}</ins>
                        <ins>{:__('下课时间')}</ins>
                        <ins>{:__('课时')}</ins>
                    </dd>
                    <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
                    <!--请注意 dd和textarea间不能存在其它任何元素，实际开发中textarea应该添加个hidden进行隐藏-->
                    <textarea name="row[monday_saturday_config]" class="form-control hidden" cols="30" rows="5"></textarea>
                </dl>
                <script id="monday_saturdaytpl" type="text/html">
                    <dd class="form-inline">
                        <ins>
                            {:Form::timepicker("<%=name%>[<%=index%>][start]", '', ['data-rule'=>'required','data-date-format'=>'HH:mm'])}
                        </ins>
                        <ins>
                            {:Form::timepicker("<%=name%>[<%=index%>][end]", '', ['data-rule'=>'required','data-date-format'=>'HH:mm'])}
                        </ins>
                        <ins>
                            {:Form::text('<%=name%>[<%=index%>][count]', '', ['data-rule'=>'required'])}
                        </ins>

                        <!--下面的两个按钮务必保留-->
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </dd>
                </script>
            </div>
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Tip')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tip" class="form-control" name="row[tip]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Select_count')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-select_count" class="form-control" name="row[select_count]" type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Switch')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <input  id="c-switch" name="row[switch]" type="hidden" value="1">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-switch" data-yes="1" data-no="0" >
                <i class="fa fa-toggle-on text-success  fa-2x"></i>
            </a>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
